﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Thep;
namespace Thep
{
    public partial class FrmGetAlpha : Form
    {

        public FrmGetAlpha()
        {
            InitializeComponent();
        }

        float _y1;
        float _y2;

        public FrmGetAlpha(float y1, float y2) {
            _y1 = y1;
            _y2 = y2;
            InitializeComponent();
        }

        private void FrmGetAlpha_Load(object sender, EventArgs e)
        {
            lbY1.Text = _y1.ToString();
            lbY2.Text = _y2.ToString();
            txtAlpha.Focus();
        }

        private void btnHuy_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void btnLuu_Click(object sender, EventArgs e)
        {
            if (txtAlpha.Text != "")
            {
                Const.Alpha = float.Parse(txtAlpha.Text.Trim());
                this.DialogResult = DialogResult.OK;
            }
            else txtAlpha.ErrorText = "Hệ số alpha không được để trống!!";
        }



    }
}
